plugins {
    id 'com.android.library'
    id 'kotlin-android'
    id 'maven-publish'
}

android {
    compileSdk 34

    defaultConfig {
        minSdk 21
        targetSdk 34
    }

    buildTypes {
        release {
            minifyEnabled false
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = JavaVersion.VERSION_17.toString()
    }
}

dependencies {
    implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.11"
    implementation "io.reactivex:rxjava:1.3.8"
    implementation "io.reactivex:rxandroid:1.2.1"
    implementation "org.jsoup:jsoup:1.16.1"
    implementation "com.github.inorichi.injekt:injekt-core:65b0440"
}

task androidSourcesJar(type: Jar) {
    classifier 'sources'
    from android.sourceSets.main.java.srcDirs
}

project.afterEvaluate {
    publishing {
        publications {
            release(MavenPublication) {
                from components.release
                artifact androidSourcesJar
            }
        }
    }
}
